package com.scoring.system.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.scoring.system.mapper.CreditMapper;
import com.scoring.system.pojo.Credit;
import com.scoring.system.service.CreditService;
@Service("creditService")
public class CreditServiceimpl implements CreditService {
	
	@Resource
	private CreditMapper creditDao;

	@Override
	public int deleteCredit(int id) {
		return creditDao.deleteByPrimaryKey(id);
	}

	@Override
	public int saveCredit(Credit record) {
		return creditDao.insert(record);
	}

	@Override
	public Credit getCreditById(int id) {
		return creditDao.selectByPrimaryKey(id);
	}

	@Override
	public List<Credit> listCredit() {
		return creditDao.listCredit();
	}

	@Override
	public int updateCredit(Credit record) {
		return creditDao.updateByPrimaryKey(record);
	}

}
